package com.sckj.springboot.contrlloer;

import com.sckj.springboot.entity.Blogger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/thymeleaf")
public class ThymeleafConfigController {
    /**
     * 处理对象
     * @param model
     * @return
     */
    @GetMapping("/getBlogger")
    public String getBlogger(Model model){
        Blogger blogger=new Blogger(1,"admin","admin");
        model.addAttribute("blogger",blogger);
        return "blogger";
    }
}
